#pragma once
#include <iostream>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/types.h>
#include <assert.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <cstring>
using namespace std;
#define PATH "/home/hcc"
#define PRID 0x666
#define SIZE 4096
#define FIFE_PATH "pipe"
void wait()
{
    int f = open(FIFE_PATH, O_RDONLY);
    assert(f != -1);
    char buf[SIZE] = {0};
    memset(buf, 0, sizeof(buf));
    read(f, buf, SIZE);
    // close(f);
}
void run()
{
    int fd = open(FIFE_PATH, O_WRONLY);
    assert(-1 != fd);
    write(fd, "1", SIZE);
    // close(fd);
}